#pragma once
#include "PublicHead.h"

class io_service_pool
	: private boost::noncopyable
{
public:
	io_service_pool( CLogModule* pLogModule );
	~io_service_pool(void);

	void Run( void );
	void Stop( void );
	boost::asio::io_service & Get_io_service( void );

private:
	typedef boost::shared_ptr<boost::asio::io_service> io_service_ptr;
	typedef boost::shared_ptr<boost::asio::io_service::work> io_service_work_ptr;
	typedef boost::shared_ptr<boost::thread> thread_ptr;
	std::vector<io_service_ptr> m_vec_io_service;
	std::vector<io_service_work_ptr> m_vec_io_service_work;
	std::size_t m_next_io_service;
	unsigned int m_nCoreNum;
	CLogModule* m_pLogModule;
};
